package com.jyu.sati.business.service;

import java.util.List;

import com.jyu.sati.common.exception.BusinessException;
import com.jyu.sati.entity.Person;
import com.jyu.sati.vo.PersonInfoVo;
import com.jyu.sati.vo.UserInfoPageVo;
import com.jyu.sati.vo.UserInfoVo;

public interface PersonService {

	int delete(Integer personId) throws BusinessException;

	int insert(Person record) throws BusinessException;

	int insertSelective(Person record) throws BusinessException;

	Person getPersonById(Integer personId) throws BusinessException;

	/**
	 * 更新非空字段
	 * 
	 * @param record
	 * @return
	 */
	int updateSelective(Person record) throws BusinessException;

	int update(Person record) throws BusinessException;

	/**
	 * 根据用户Id获取个人用户信息
	 * 
	 * @param userId
	 * @return
	 */
	PersonInfoVo getPersonInfo(String userId) throws BusinessException;

	/**
	 * 根据用户Id获取个人用户信息(展示给公众)
	 * 
	 * @param userId
	 * @return
	 */
	PersonInfoVo getPersonInfoForPublic(String userId) throws BusinessException;

	/**
	 * 根据用户Id获取个人用户信息（管理员审核使用）
	 * 
	 * @param userId
	 * @return
	 */
	PersonInfoVo getAuditPersonInfo(String userId) throws BusinessException;

	/**
	 * 更新个人用户信息
	 * 
	 * @param personInfo
	 * @throws BusinessException
	 */
	void updatePersonInfo(PersonInfoVo personInfo) throws BusinessException;

	/**
	 * 获取一页个人用户数据
	 * 
	 * @param condition
	 * @return
	 */
	List<UserInfoVo> getPersonUserInfoPageByCondition(UserInfoPageVo condition);

	/**
	 * 根据查询条件获取总数 (个人用户)
	 * 
	 * @param condition
	 * @return
	 */
	Integer getPersonTotalNoByCondition(UserInfoPageVo condition);

}
